package com.tpp.threat_perception_platform.service.impl;

import com.tpp.threat_perception_platform.dao.WinCveDbMapper;
import com.tpp.threat_perception_platform.pojo.WinCveDb;
import com.tpp.threat_perception_platform.response.ResponseResult;
import com.tpp.threat_perception_platform.service.CveService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Service
public class CveServiceImpl implements CveService {
    @Autowired
    private WinCveDbMapper winCveDbMapper;

    @Override
    public ResponseResult<List<WinCveDb>> cveDetail(String hotfixId) {
        List<WinCveDb> results = winCveDbMapper.selectCveByHotfixId(hotfixId);
        return new ResponseResult<>(0, "success", (long)results.size(), results);
    }
}
